package DuiXingShuZu_4;

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

public class GirlFriends {
    private String name;
    private int age;
    private char gender;
    private String hobby;

    //1.空参
    public GirlFriends() {
    }

    //2.带参
    public GirlFriends(String name, int age, char gender, String hobby) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.hobby = hobby;
    }

    //3.set和get
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public char getGender() {
        return gender;
    }

    public void setGender(char gender) {
        this.gender = gender;
    }

    public String getHobby() {
        return hobby;
    }

    public void setHobby(String hobby) {
        this.hobby = hobby;
    }

    //创建显示对象属性的方法
    public void showRoleInfo(){
        System.out.println("姓名为：" + getName());
        System.out.println("年龄为：" + getAge());
        System.out.println("性别为：" + getGender());
        System.out.println("爱好为：" + getHobby());
    }
}
